Skip to content

ci: fix boj-build secrets-in-if + Scorecard enforcer#55

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/ecstatic-wright-OBEvx
Jun 15, 2026
Merged

ci: fix boj-build secrets-in-if + Scorecard enforcer#55
hyperpolymath merged 2 commits into
mainfrom
claude/ecstatic-wright-OBEvx

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

Two inlined workflows could not validate / pass on main.

boj-build.ymlsecrets in if:

jobs.trigger-boj.if referenced secrets.BOJ_SERVER_URL != ''. The secrets context is not available in if: — referencing it invalidates the whole workflow.

Fix: removed the job-level if:. The trigger step already shell-guards on an empty BOJ_URL (set -euo pipefail; explicit empty check; exit 0), so an unconfigured repo stays a fast no-op — and this honours the documented "secret or variable" enablement, which a vars-only gate would silently break.

scorecard-enforcer.yml — OSSF publish + run-step (HTTP 400) and an unreadable score

  • The scorecard job ran ossf/scorecard-action with publish_results: true and a run: step in the same job; OSSF rejects that with HTTP 400 ("scorecard job must only have steps with uses").
  • The gate parsed SARIF at .runs[0].tool.driver.properties.score, which SARIF does not carry → it always read 0 and failed the < 5 check.

Fix: split into an uses-only publish job + an unprivileged score-gate job that re-derives the score in JSON mode (top-level .score). Also: least-privilege contents: read, bounded timeouts, canonical SHA pins. (Both failure modes verified live on nextgen-languages scorecard-enforcer run 27468148000.)

Verification

Both files validated as parseable YAML (yaml.safe_load). These workflows trigger on push-to-main (not pull_request), so the green proof lands after merge.

https://claude.ai/code/session_01VwbFNQJw23tW8tqM7utWku


Generated by Claude Code

boj-build.yml: removed the job-level `if:` referencing secrets.BOJ_SERVER_URL.
The `secrets` context is not available in `if:` — referencing it invalidates
the whole workflow. The trigger step already shell-guards on an empty BOJ_URL
and exits 0, so an unconfigured repo stays a fast no-op (honouring the
documented secret-or-var configuration).

scorecard-enforcer.yml: the scorecard job invoked ossf/scorecard-action with
publish_results: true AND a run: step in the same job, which OSSF rejects with
HTTP 400 ("scorecard job must only have steps with `uses`"), failing the run.
Split into an uses-only publish job + an unprivileged JSON score-gate (reads
top-level `.score`; the SARIF aggregate path is absent so the old gate always
read 0 and failed < 5). Least-privilege contents:read, timeouts, SHA pins.

https://claude.ai/code/session_01VwbFNQJw23tW8tqM7utWku
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 15, 2026 12:20
@hyperpolymath
hyperpolymath merged commit 626791a into main Jun 15, 2026
@hyperpolymath
hyperpolymath deleted the claude/ecstatic-wright-OBEvx branch June 22, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants